{% extends 'base.html' %}

{% block title %}注册{% endblock %}

{% block link %}
    <link rel="stylesheet" href="{{ url_for('static', filename='css/signin.css') }}">
{% endblock %}

{% block main %}
    <div class="container">
        <div class="col-sm-2"></div>
        <div class="center-block col-sm-8">
{#            <form class="form-horizontal register-form " id="myform" method="post">#}
            <form class="form-horizontal register-form">
                <div class="form-group text-center">
                    <label class="col-sm-3 control-label"></label>
                    <div class="col-sm-5">
                        <h2 class="form-signin-heading col-sm-10 text-center">注册</h2>
                    </div>
                </div>
                <div class="form-group text-center">
                    <label for="inputEmail3" class="col-sm-3 control-label">邮箱地址</label>
                    <div class="col-sm-5">
                        <input type="email" class="form-control" name="email" id="inputEmail" placeholder="Email"
                               required autofocus>
                    </div>
                </div>
                <div class="form-group text-center">
                    <div class="col-sm-3"></div>
                    <div class="col-sm-3">
                        <input type="text" class="form-control" name="code" id="code" placeholder="请输入验证码"
                               required
                               autofocus>
                    </div>
                    <label for="inputEmail3" class="col-sm-2 control-label"><a href="javascript:void 0;" class="button"
                                                                               id='get_email'>获取验证码</a></label>
                </div>

                <div class="form-group text-center">
                    <label for="inputpassword3" class="col-sm-3 control-label">密码</label>
                    <div class="col-sm-5">
                        <input type="password" class="form-control" id="inputpassword" placeholder="密码" name="password"
                               required minlength="6" maxlength="16">
                    </div>
                </div>
                <div class="form-group text-center">
                    <label for="inputpassword23" class="col-sm-3 control-label">确认密码</label>
                    <div class="col-sm-5">
                        <input type="password" class="form-control" id="inputpassword2"
                               placeholder="确认密码" name="password2"
                               required minlength="6" maxlength="16">
                    </div>
                </div>
                <div class="form-group text-center">
                    <label class="col-sm-3 control-label"></label>
                    <div class="col-sm-5">
                        <a class="btn btn-lg btn-primary btn-block" id="register">注 册</a>
                    </div>
                </div>
            </form>
            <div class="col-sm-3"></div>
            <div class="text-center">
                <a href="{{ url_for('login') }}" class="col-sm-3">已有账户？去登录</a>
                <a href="{{ url_for('index') }}" class="col-sm-2">返回主页</a>
            </div>
        </div>
        <div class="col-sm-2"></div>
    </div>
{% endblock %}

{% block footer %}
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script type=text/javascript>$SCRIPT_ROOT = {{ request.script_root|tojson|safe }};</script>
    <script src="{{ url_for('static', filename='js/register.js') }}"></script>
{% endblock %}
